#include <qapplication.h>
#include "BrainGUI.h"
#include <qdesktopwidget.h>
#include <qfiledialog.h>

#define	GRAPHICAL /* Necessary for the brain program to stop and wait for a continue button press */

extern "C"
{
	void _AddLine(char* string);
	int _CanContinue(void);
}

BrainGUI* window;

int main( int argc, char **argv )
{
	QApplication app( argc, argv );
	app.setWindowIcon(QIcon(":images/brain.jpg"));

	window = new BrainGUI();

	int deskwidth = (int)QApplication::desktop()->width();
        int deskheight = (int)QApplication::desktop()->height();

        //window->setGeometry((int)(deskwidth - (deskwidth - (deskwidth / 2)) * 1.5) / 2, (int)(deskheight - (deskheight - (deskheight / 2)) * 1.5) / 2, (int)((deskwidth - (deskwidth / 2)) * 1.5), (int)(((deskheight - (deskheight / 2)) * 1.5)));

	/* Make the main window visible */		
	window->show();

	return app.exec();
}

void _AddLine(char* string)
{
	window->AddLine(string);
}

int _CanContinue(void)
{
	return (window->CanContinue());
}
